package server;

import java.util.HashMap;
import java.util.Map;

/**
 * 免责声明：本模拟器源代码下载自ragezone.com，仅用于技术研究学习，无任何商业行为。
 */
public class StructPetCapsule {
    public static String[] types = new String[]{"incPAD", "incMAD", "incDAMr", "ignoreTargetDEF", "incCr", "incMHPr", "incMMPr", "incEXPr"};
    public int name;
    public String desc;
    public Map<String, Integer> data = new HashMap<>();

    public int get(String string) {
        return data.get(string) != null ? data.get(string) : 0;
    }

    public String toString() {
        StringBuilder stringBuilder = new StringBuilder();
        for (String string : types) {
            if (get(string) <= 0) continue;
            stringBuilder.append(this.desc.replace("#" + string, String.valueOf(get(string))));
        }
        return stringBuilder.toString();
    }
}
